﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using WebTraderLiteCL;


namespace WebTraderLite.Account
{
    public partial class AccountInfo : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            
            string user = System.Web.HttpContext.Current.User.Identity.Name.ToString();
            //usName.Text = user;
            User curUser = new User(user);
            FirstName.Text = "<h3>Your name is: "+curUser.getFirstName().ToUpper()+"   "+curUser.getLastName().ToUpper()+"</h3>";
            Address.Text = "Address: "+curUser.getUserAddress();
            Zip.Text = "Zip Code: "+curUser.getzipCode();
            Email.Text = "Email Address: "+curUser.getEmail();
            RegDate.Text = "You registered on: "+curUser.getRegistrationDate().ToString();
            accBalance.Text = "Account Balance: "+curUser.getAccBalance().ToString();
        }//end Page_Load

        protected void btnChangeInformation_Click(object sender, EventArgs e)
        {
            Response.Redirect("~/Account/ChangeAccount.aspx");
        }//end btnChangeInformation_Click

   
        protected void btnChangeBalance_Click(object sender, EventArgs e)
        {
            Response.Redirect("~/Account/ChangeAccountBal.aspx");
        }//end btnChangeInformation_Click
    }
}